package main

import "fmt"

// 结构体定义

type Student struct {
	*Person
	addr string
}

type Person struct {
	id   int
	name string
	age  int
}

func (s *Student) PrintInfo() {
	fmt.Println(*s)
}

func (p *Person) PrintInfo() {
	fmt.Println(*p)
}

func main() {
	var s1 = Student{&Person{1, "张三", 18}, "北京"}
	s1.PrintInfo()
}
